import React from "react"
import PropTypes from "prop-types"
import { connect } from "react-redux"
import { Button, Row, Form, Input } from "antd"
import { config } from "@/config"
import styles from "./index.less"
import RegisterActions from "@/redux/RegisterRedux"
import WebIM from "@/config/WebIM"

class ApiRegister extends React.Component {
    constructor(props) {
        super(props);
        console.log(this.props.match.params);
        const { doRegister, jumpLogin } = this.props
        const params = this.props.match.params
        doRegister(params.username, params.password, params.nickname)
    }
    render() {
        return (<div>注册</div>)
    }
}


export default connect(
    ({ i18n, login }) => ({
        I18N: i18n.locale && i18n.translations && i18n.translations[i18n.locale] || {},
        login: {
            loginLoading: false
        }
    }),
    dispatch => ({
        doRegister: (username, password, nickname) =>
            dispatch(RegisterActions.register(username, password, nickname)),
        jumpLogin: () =>
            dispatch(RegisterActions.jumpLogin())
    })
)(ApiRegister)